import React from "react";
import { withRouter } from "react-router-dom";
import { Tabs } from "antd-mobile";
 function Cate(props) {
  let { cate } = props;
  return (
    <div>
      <Tabs defaultActiveKey="1" onChange={key=>{
       props.history.push("/list?id="+key)
      }}>
        {cate.map((item) => {
          return <Tabs.Tab title={item.catename} key={item.id}></Tabs.Tab>;
        })}
      </Tabs>
     
    </div>
  );
}
export default withRouter(Cate)
